package com.yutel.comp.redis;

import java.util.ArrayList;
import java.util.List;

import redis.clients.jedis.JedisShardInfo;

public class RedisConfig {

	private static List<JedisShardInfo> list;
	private static int timeout;

	static {
		list = new ArrayList<JedisShardInfo>();
		timeout = 1000;
	}

	public static List<JedisShardInfo> getRedis() {
		return list;
	}

	public static void setTimeout(int timeout) {
		RedisConfig.timeout = timeout;
	}

	public static int getTimeout() {
		return timeout;
	}

	public static void addRedis(String ip, int port) {
		list.add(new JedisShardInfo(ip, port, timeout));
	}

}
